package com.polaris.live.adapter

import android.annotation.SuppressLint
import com.bumptech.glide.Glide
import com.polaris.live.common.adapter.BaseBindingAdapter
import com.polaris.live.common.adapter.VBViewHolder
import com.polaris.live.databinding.AdapterMagicLampRewardItemBinding
import com.polaris.live.resp.back_resp.PayerLampReward
import com.polaris.live.utils.image.ImageUtils

/**
 * MagicLampRewardAdapter 奖励
 *
 * @author Created by 天晴 on 2024/11/27/008 15:01
 */
class MagicLampRewardAdapter :
    BaseBindingAdapter<AdapterMagicLampRewardItemBinding, PayerLampReward>() {

    @SuppressLint("SetTextI18n")
    override fun convert(
        holder: VBViewHolder<AdapterMagicLampRewardItemBinding>,
        item: PayerLampReward,
    ) {
        holder.vb.apply {
            Glide.with(context)
                .load(ImageUtils.imgPath(item.displayIcon))
                .into(imageRaw)
            itemUserNickName.text = item.displayText
            rewardTips.text = item.text
        }
    }
}